// 初始化按钮状态

export default function updateCardButtonStatus(page, orgVal, record) {
    const flag = page === 'card' && record;
    this.props.button.setButtonVisible({
        check: flag && (!orgVal.refpk || record.pk_org.value === orgVal.refpk) && !record.delflag.value,
        delete: flag && (!orgVal.refpk || record.pk_org.value === orgVal.refpk) && record.delflag.value,
        edit: flag && (!orgVal.refpk || record.pk_org.value === orgVal.refpk)
    });
    this.props.button.setButtonDisabled({
        listrpt: !flag,
        print: !flag,
        output: !flag
    });
}
